{{ flash.output() }}
{% if accountList is defined %}
    <table class="table table-hover" style="table-layout: fixed; height: 200px;overflow: auto">
        <thead>
        <tr class="info">
            <th colspan="6">主关联表</th>
        </tr>
        <tr class="info">
            <th>用户id</th>
            <th style="">姓名</th>
            <th>账号</th>
            <th>手机</th>
            <th>状态</th>
            <th style="text-align: center">操作</th>
        </tr>
        </thead>
        <tbody>
            {% for account in accountList %}
                <tr>
                    {% if loop.last  %}<td>{{ account['iUserId'] }}</td> {% else %}  <td height="35px;">{{ account['iUserId'] }}</td> {% endif %}
                    <td>{{ account['sUserName'] }}</td>
                    <td>{{ account['sLogonName'] }}</td>
                    <td>{{ account['sSelfPhone'] }}</td>
                    <td>{{ account['bDisable'] ? '禁用' : '启用' }}</td>
                    <td style="text-align: center;">
                        <a href="#" onclick="setContact({{ account['iUserId'] }})" style="color: #00ee00;margin-right: 20px;">关联</a>
                        <a href="#" onclick="disContact({{ account['iUserId'] }})" style="color: #3085d6;margin-right: 20px;">取消关联</a>
                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% endif %}

<table class="table table-hover" style="table-layout: fixed;">
    <thead>
    <tr class="info">
        <th colspan="7">所使用账号</th>
    </tr>
    <tr class="info">
        <th>账号</th>
        <th>用户id</th>
        <th style="">姓名</th>
        <th>手机</th>
        <th>状态</th>
        <th>备注</th>
        <th style="text-align: center">操作</th>
    </tr>
    </thead>
    <tbody>
    {% if staffUser is defined %}
        {% for account in staffUser %}
            <tr>
                <td>{{ account['sLogonName'] }}</td>
                <td>{{ account['iUserId'] }}</td>
                <td>{{ account['sUserName'] }}</td>
                <td>{{ account['sSelfPhone'] }}</td>
                <td>{{ account['bDisable'] ? '禁用' : '启用' }}</td>
                <td>{{ account['mDesc'] }}</td>
                <td style="text-align: center;">
                    <a href="#" onclick="deleteUser({{ account['iSUId'] }})" style="color: red;margin-right: 20px;">删除</a>
                </td>
            </tr>
        {% endfor %}
    {% endif %}
    <tr>
        <td colspan="7"><a href="#" class="btn btn-success pull-right" onclick="addUser()" style="margin-right: 20px;">新增账号</a></td>
    </tr>

    </tbody>
</table>